package com.GroupSix.entity;

import com.GroupSix.tool.ArrayIntegerTypeHandler;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("exam_paper")
public class ExamPaperEntity {
    //试卷id
    @TableId(type = IdType.AUTO)
    private Long id;

    //试卷类型
    private String paperType;

    //试卷名称
    private String paperName;

    //教师id
    private Long teacherId;

    //规则id
    private Long ruleId;

    //题目列表
    @TableField(typeHandler = ArrayIntegerTypeHandler.class)
    private Integer[] questions;

    //考试开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    //考试结束时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    //是否有效
    private Integer isActive;
}
